package com.neusoft.neuiotms.dcvm.task;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

import com.neusoft.neuiotms.dcvm.task.cmdbSyn.service.CmdbSynService;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Component
@DisallowConcurrentExecution
public class CmdbDeviceSynTask extends QuartzJobBean {
    @Autowired
    private CmdbSynService cmdbSynService;

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        CmdbDeviceSynTask.log.info("开始同步IT资产接口数据 start{}", System.currentTimeMillis());
        this.cmdbSynService.doCmdbSyn();
        CmdbDeviceSynTask.log.info("开始同步IT资产接口数据 finish{}", System.currentTimeMillis());
    }

}
